package org.cocopapaya.anttsp.domain;

public class Quantity {
	
	private double value;
	
	private Quantity(double i) {
		this.value = i;
	}

	public double doubleValue() {
		return this.value;
	}

	public Quantity add(Quantity other) {
		this.value += other.value;
		return this;
		
	}
	
	public Quantity pow( double p){
		this.value = Math.pow(this.value, p);
		return this;
	}

	public Quantity multiply(double m) {
		this.value = this.value*m;
		return this;
	}

	public Quantity subtract(Quantity quantity) {
		this.value -= quantity.value;
		return this;
	}

	public Quantity divide(double d) {
		this.value /= d;
		return this;
	}

	public static Quantity newZero() {
		// TODO Auto-generated method stub
		return new Quantity(0);
	}
	
	public static Quantity newWithDouble(double v) {
		// TODO Auto-generated method stub
		return new Quantity(v);
	}
	

}
